package com.xiaoma.pattern.proxy.jdk;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class MyProxy<T> implements InvocationHandler {

    private T origin;

    public MyProxy(T origin) {
        this.origin = origin;
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        method.invoke(origin, args);
        return null;
    }
}
